<?php
/**
 * Created by PhpStorm.
 * User: lenovo
 * Date: 2021/3/22
 * Time: 11:25
 */

namespace api\modules\v2\controllers;


use api\controllers\OnAuthController;
use common\models\video\Video;

class VideoController extends OnAuthController
{
    public $modelClass =Video ::class;

    protected $authOptional = ['index'];

    /**
     * @return string|\yii\data\ActiveDataProvider
     */
    public function actionIndex()
    {
        $membercate = Video::find()
            ->join('join','rf_author','rf_author.id = rf_video.author_id')
            ->select('rf_video.*,rf_author.name')
            ->asArray()
            ->all();
        if($membercate){
            return $membercate;
        }else{
            return "请求失败";
        }
    }
}